import request from '@/utils/http'

// 保存评论
export function saveComment(comment) {

    const queryData = comment
    return request(
         '/api/comment/save', queryData, 'post'
    )
}

// 保存回复
export function saveReply(comment) {

    const queryData = comment
    return request(
        '/api/comment/save', queryData, 'post'
    )
}

// 根据活动ID查询该活动的所有评论
export function queryCommentByCID(campaignId) {

    var params = {
        campaignId: campaignId
    }

    params.page = 1
    params.limit = 20
    params.sidx = 'create_time'
    params.order = 'desc'

    return request(
        '/api/comment/infoByCID', params, 'post', false
    )
}


export function queryCommentInfoByID(cid) {

    return request(
        '/api/comment/info/' + cid,  {}, 'get'
    )
}




